package com.app.service.impl;

import com.app.common.SystemConstant;
import com.app.mapper.LanguageMapper;
import com.app.mapper.UserMapper;
import com.app.model.*;
import com.app.service.*;
import com.app.util.CommonHelp;
import com.app.util.TokenUtils;
import com.app.vo.LoginVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * @Description:语言
 * @Author: N
 * @Date: 2022年11月24日 10点29分
 */
@Service
public class LanguageServiceImpl implements LanguageService {
@Autowired
LanguageMapper languageMapper;
    @Override
    public List<LanguageModel> getAllList() {
        return languageMapper.selectList(null);
    }

    @Override
    public LanguageModel getModelById(int id) {
        QueryWrapper<LanguageModel> queryWrapper = new QueryWrapper<>();
        queryWrapper.select().eq("id",id);
        List<LanguageModel> userList = languageMapper.selectList(queryWrapper);
        if(userList.isEmpty())
        {
            return null;
        }else {
            return userList.get(0);
        }
    }
}
